package com.itzjc.domain.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 数据库POJO_user表
 *
 * @return:
 **/

public class User implements Serializable {

    private Integer id;//主键
    private String userName;//姓名
    private String password;  //密码
    private String phone;//手机号，拥有唯一索引
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime; //创建时间
    private Integer status;//状态码
    private String email;//邮箱
    @JsonProperty("head_img")
    private String headImg;//头像地址,注解是变成json的时候变成别名的意思
    private String teacherBelong;//所属老师
    private String placeBelong;//所属单位




    @JsonIgnore
    //预留字段，后续可能有用
    private int uid;
    @JsonIgnore
    private String blank1;
    @JsonIgnore
    private String blank2;



    //扩展字段，封装返回的token
    private String token;

    //有参、空参、set/get、toString

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", createTime=" + createTime +
                ", status=" + status +
                ", email='" + email + '\'' +
                ", headImg='" + headImg + '\'' +
                ", teacherBelong='" + teacherBelong + '\'' +
                ", placeBelong='" + placeBelong + '\'' +
                ", uid=" + uid +
                ", blank1='" + blank1 + '\'' +
                ", blank2='" + blank2 + '\'' +
                ", token='" + token + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getTeacherBelong() {
        return teacherBelong;
    }

    public void setTeacherBelong(String teacherBelong) {
        this.teacherBelong = teacherBelong;
    }

    public String getPlaceBelong() {
        return placeBelong;
    }

    public void setPlaceBelong(String placeBelong) {
        this.placeBelong = placeBelong;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getBlank1() {
        return blank1;
    }

    public void setBlank1(String blank1) {
        this.blank1 = blank1;
    }

    public String getBlank2() {
        return blank2;
    }

    public void setBlank2(String blank2) {
        this.blank2 = blank2;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public User() {
    }

    public User(Integer id, String userName, String password, String phone, Date createTime, Integer status, String email, String headImg, String teacherBelong, String placeBelong, int uid, String blank1, String blank2, String token) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.phone = phone;
        this.createTime = createTime;
        this.status = status;
        this.email = email;
        this.headImg = headImg;
        this.teacherBelong = teacherBelong;
        this.placeBelong = placeBelong;
        this.uid = uid;
        this.blank1 = blank1;
        this.blank2 = blank2;
        this.token = token;
    }
}
